
#ifndef __COMPAT_OBJECT_INTERFACE_H__
#define __COMPAT_OBJECT_INTERFACE_H__

#include "placeholder.h"

class object
{
public:
	template < typename value_type >
	object ( const value_type & value ) ;
	object ( const object & other ) ;

	object ( void ) ;
	~object ( void ) ;

public:
	template < typename value_type >
	object & operator = ( const value_type & rhs ) ;
	object & operator = ( const object & rhs ) ;

public: 
	object &				swap ( object & rhs ) ;
	bool					empty ( void ) const ;
	const std::type_info &	type ( void ) const ;

private:
	anything *	object_ ;
} ;



template < typename value_type >
object::object ( const value_type & value )
: object_ ( new placeholder < value_type > ( value ) )
{

}


template < typename value_type >
object & object::operator = ( const value_type & rhs )
{
	object ( rhs ).swap ( *this ) ;	// safety destruction
	return *this;
}


	//template < typename value_type >
	//bool	operator == ( const value_type & rhs ) const ;
	//bool	operator == ( const object & rhs ) const ;

	//template < typename value_type >
	//bool	operator != ( const value_type & rhs ) const ;
	//bool	operator != ( const object & rhs ) const ;

	//template < typename value_type >
	//bool	operator < ( const value_type & rhs ) const ;
	//bool	operator < ( const object & rhs ) const ;

	//template < typename value_type >
	//bool	operator <= ( const value_type & rhs ) const ;
	//bool	operator <= ( const object & rhs ) const ;

	//template < typename value_type >
	//bool	operator > ( const value_type & rhs ) const ;
	//bool	operator > ( const object & rhs ) const ;

	//template < typename value_type >
	//bool	operator >= ( const value_type & rhs ) const ;
	//bool	operator >= ( const object & rhs ) const ;

//template < typename value_type >
//bool object::operator == ( const value_type & rhs ) const
//{
//	return true ;
//}
//
//
//template < typename value_type >
//bool object::operator != ( const value_type & rhs ) const
//{
//	return true ;
//}
//
//
//template < typename value_type >
//bool object::operator < ( const value_type & rhs ) const
//{
//	return true ;
//}
//
//
//template < typename value_type >
//bool object::operator <= ( const value_type & rhs ) const
//{
//	return true ;
//}
//
//
//template < typename value_type >
//bool object::operator > ( const value_type & rhs ) const
//{
//	return true ;
//}
//
//
//template < typename value_type >
//bool object::operator >= ( const value_type & rhs ) const
//{
//	return true ;
//}


#endif	// #ifndef __COMPAT_OBJECT_INTERFACE_H__